import request from '@/utils/request'

// 查询用户门禁管理列表
export function listCommunityDoorUser(query) {
  return request({
    url: '/system/communityDoorUser/list',
    method: 'get',
    params: query
  })
}

// 查询用户门禁管理详细
export function getCommunityDoorUser(id) {
  return request({
    url: '/system/communityDoorUser/' + id,
    method: 'get'
  })
}

// 新增用户门禁管理
export function addCommunityDoorUser(data) {
  return request({
    url: '/system/communityDoorUser',
    method: 'post',
    data: data
  })
}

// 修改用户门禁管理
export function updateCommunityDoorUser(data) {
  return request({
    url: '/system/communityDoorUser',
    method: 'put',
    data: data
  })
}
// 修改用户门禁管理
export function changeDoorUserStatus(id,status) {
  let data = {
    id,
    status
  }
  return request({
    url: '/system/communityDoorUser',
    method: 'put',
    data: data
  })
}

// 删除用户门禁管理
export function delCommunityDoorUser(id) {
  return request({
    url: '/system/communityDoorUser/' + id,
    method: 'delete'
  })
}

// 导出用户门禁管理
export function exportCommunityDoorUser(query) {
  return request({
    url: '/system/communityDoorUser/export',
    method: 'get',
    params: query
  })
}
